home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / strtok.man < prev    next >
Encoding:
Text File  |  1990-09-11  |  1.5 KB  |  67 lines

  1.  
  2.  
  3.  
  4. STRTOK                C Library Procedures                 STRTOK
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      strtok, strsep - string token operations
  10.  
  11. SSYYNNOOPPSSIISS
  12.      cchhaarr **ssttrrttookk((ssttrr,, sseepp))
  13.      cchhaarr **ssttrr,, **sseepp;;
  14.  
  15.      cchhaarr **ssttrrsseepp((ssttrr,, sseepp))
  16.      cchhaarr **ssttrr,, **sseepp;;
  17.  
  18.      _S_t_r_t_o_k is used to isolate sequential tokens in a null-
  19.      terminated string, _s_t_r.  These tokens are separated in the
  20.      string by oonnee oorr mmoorree of the characters in _s_e_p.  The first
  21.      time that _s_t_r_t_o_k is called, _s_t_r should be specified; subse-
  22.      quent calls, wishing to obtain further tokens from the same
  23.      string, should pass a null pointer instead.  The separator
  24.      string, _s_e_p, must be supplied each time, and may change
  25.      between calls.  _S_t_r_t_o_k returns a pointer to the start of
  26.      each subsequent token in the string, after replacing the
  27.      token itself with a NUL character.  When no more tokens
  28.      remain, a null pointer is returned.
  29.  
  30.      _S_t_r_s_e_p behaves similarly to _s_t_r_t_o_k with the exception that
  31.      the tokens in the string are separated by single occurrences
  32.      of separator characters.  This routine was added to allow
  33.      handling blank fields.
  34.  
  35. BBUUGGSS
  36.      There is no way to get tokens from multiple strings simul-
  37.      taneously.
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0             November 14, 1988                       1
  64.  
  65.  
  66.  
  67.